Skip to content

Conversation

alexcrichton
Copy link
Member

christophebiocca and others added 30 commits November 27, 2016 15:44
For file

```rust
use std::path::Path;

fn f(p: Path) { }
```

provide the following error

```nocode
error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied in `std::path::Path`
 --> file.rs:3:6
  |
3 | fn f(p: Path) { }
  |      ^ within `std::path::Path`, the trait `std::marker::Sized` is not implemented for `[u8]`
  |
  = note: `[u8]` does not have a constant size known at compile-time
  = note: required because it appears within the type `std::path::Path`
  = note: all local variables must have a statically known size
```
This makes it easier to work with mir test failures during development.

- Show which expected line was not found
- Show full expected output
- Show full actual output
After the fix of rust-lang#37453 in PR rust-lang#37369, instead of pointing at only the
cast type, point at the full cast span when a cast needs a dereference:

```
error: casting `&{float}` as `f32` is invalid
  --> ../../../src/test/ui/mismatched_types/cast-rfc0401.rs:81:30
   |
81 |     vec![0.0].iter().map(|s| s as f32).collect::<Vec<f32>>();
   |                              ^^^^^^^^ cannot cast `&{float}` as `f32`
   |
help: did you mean `*s`?
  --> ../../../src/test/ui/mismatched_types/cast-rfc0401.rs:81:30
   |
81 |     vec![0.0].iter().map(|s| s as f32).collect::<Vec<f32>>();
   |                              ^
```

instead of

```
error: casting `&{float}` as `f32` is invalid
  --> ../../../src/test/ui/mismatched_types/cast-rfc0401.rs:81:35
   |
81 |     vec![0.0].iter().map(|s| s as f32).collect::<Vec<f32>>();
   |                              -    ^^^
   |                              |
   |                              |
   |                              did you mean `*s`?
   |                              cannot cast `&{float}` as `f32`
```
They cause the search index from the std docs to get overwritten just like rust-lang#34800.

Part of rust-lang#38319.
@alexcrichton alexcrichton force-pushed the rollup branch 3 times, most recently from cd03fd3 to 4cb1206 Compare December 20, 2016 21:10
@bors
Copy link
Collaborator

bors commented Dec 20, 2016

☔ The latest upstream changes (presumably #38271) made this pull request unmergeable. Please resolve the merge conflicts.

@alexcrichton
Copy link
Member Author

@bors: r+ p=100 force

@bors
Copy link
Collaborator

bors commented Dec 20, 2016

📌 Commit d5f1c6e has been approved by alexcrichton

@bors
Copy link
Collaborator

bors commented Dec 20, 2016

⌛ Testing commit d5f1c6e with merge 164619a...

bors added a commit that referenced this pull request Dec 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup
Projects
None yet
Development

Successfully merging this pull request may close these issues.